﻿<!DOCTYPE html>
<html>
  <head>
    <title>居住信息</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link href="/resources/resources/css/jquery-ui-themes.css" type="text/css" rel="stylesheet"/>
    <link href="/resources/resources/css/axure_rp_page.css" type="text/css" rel="stylesheet"/>
    <link href="/resources/data/styles.css" type="text/css" rel="stylesheet"/>
    <link href="/resources/files/居住信息/styles.css" type="text/css" rel="stylesheet"/>
    <link href="resources/files/个人信息/styles.css" type="text/css" rel="stylesheet"/>
    <script src="/resources/resources/scripts/jquery-1.7.1.min.js"></script>
    <script src="/resources/resources/scripts/jquery-ui-1.8.10.custom.min.js"></script>
    <style>
        #aaa > div{
            margin-top: 20px;
        }
        #u30_div {
          border-width:0px;
          position:absolute;
          left:0px;
          top:0px;
          width:87px;
          height:25px;
          background:inherit;
          box-sizing:border-box;
          border-width:1px;
          border-style:solid;
          border-color:rgba(121, 121, 121, 1);
          border-radius:0px;
          -moz-box-shadow:none;
          -webkit-box-shadow:none;
          box-shadow:none;
        }
        #u81_div {
          border-width:0px;
          position:absolute;
          left:0px;
          top:0px;
          width:82px;
          height:25px;
          background:inherit;
          background-color:rgba(102, 102, 255, 1);
          box-sizing:border-box;
          border-width:1px;
          border-style:solid;
          border-color:rgba(121, 121, 121, 1);
          border-radius:0px;
          -moz-box-shadow:none;
          -webkit-box-shadow:none;
          box-shadow:none;
        }
    </style>
  </head>


  <body>

  <form  id="form2" >
    <input type="hidden" id="id" >

    <div id="base" class="">
      <div id="yin">

            <div id="u29" class="ax_default box_1">
                <div id="u29_div" class=""></div>
                <div id="u29_text" class="text ">
                    <p><span>流动人口服务管理系统</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u30" class="ax_default box_1">
                <div id="u30_div" class=""></div>
                <div id="u30_text" class="text ">
                    <p><span onclick="toPersonalMessage()">个人信息</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u171" class="ax_default box_1">
                <div id="u171_div" class=""></div>
                <div id="u171_text" class="text ">
                    <p><span onclick="toSpouse()">配偶信息</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u31" class="ax_default box_1">
                <div id="u31_div" class=""></div>
                <div id="u31_text" class="text ">
                    <p><span onclick="toFamilyMember()">同住家庭成员</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u32" class="ax_default box_1">
                <div id="u32_div" class=""></div>
                <div id="u32_text" class="text ">
                    <p><span onclick="toFamilyPlanning()">计生信息</span></p>
                </div>
            </div>


            <!-- Unnamed (矩形) -->
            <div id="u172" class="ax_default box_1">
                <div id="u172_div" class=""></div>
                <div id="u172_text" class="text ">
                    <p><span onclick="toEmploymentInformation()">就业信息</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u81" class="ax_default box_1">
                <div id="u81_div" class=""></div>
                <div id="u81_text" class="text ">
                    <p><span>居住信息</span></p>
                </div>
            </div>
        <!-- Unnamed (水平线) -->
        <div id="u170" class="ax_default line">
            <img id="u170_img" class="img " src="resources/images/个人信息/u170.png"/>
        </div>



      </div>

    <div id="aaa">
      <!-- Unnamed (矩形) -->
      <div id="u592" class="ax_default box_1">
        <div id="u592_div" class=""></div>
        <div id="u592_text" class="text ">
          <p><span>居住方式;</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u593" class="ax_default box_1">
        <div id="u593_div" class=""></div>
        <div id="u593_text" class="text ">
          <p><span>居住事由：</span></p>
        </div>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u594" class="ax_default radio_button">
        <label for="u594_input" style="position: absolute; left: 0px;">
          <div id="u594_text" class="text ">
            <p><span>务工</span></p>
          </div>
        </label>
        <input id="u594_input" type="radio" value="106" name="dwellCause" />
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u595" class="ax_default radio_button">
        <label for="u595_input" style="position: absolute; left: 0px;">
          <div id="u595_text" class="text ">
            <p><span>务农</span></p>
          </div>
        </label>
        <input id="u595_input" type="radio" value="107" name="dwellCause"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u596" class="ax_default radio_button">
        <label for="u596_input" style="position: absolute; left: 0px;">
          <div id="u596_text" class="text ">
            <p><span>经商</span></p>
          </div>
        </label>
        <input id="u596_input" type="radio" value="108" name="dwellCause"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u597" class="ax_default radio_button">
        <label for="u597_input" style="position: absolute; left: 0px;">
          <div id="u597_text" class="text ">
            <p><span>保姆</span></p>
          </div>
        </label>
        <input id="u597_input" type="radio" value="109" name="dwellCause"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u598" class="ax_default radio_button">
        <label for="u598_input" style="position: absolute; left: 0px;">
          <div id="u598_text" class="text ">
            <p><span>服务</span></p>
          </div>
        </label>
        <input id="u598_input" type="radio" value="110" name="dwellCause"/>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u599" class="ax_default box_1">
        <div id="u599_div" class=""></div>
        <div id="u599_text" class="text ">
          <p><span>房屋类别</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u600" class="ax_default box_1">
        <div id="u600_div" class=""></div>
        <div id="u600_text" class="text ">
          <p><span>房屋地址</span></p>
        </div>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u601" class="ax_default radio_button">
        <label for="u601_input" style="position: absolute; left: 0px;">
          <div id="u601_text" class="text ">
            <p><span>单身居住</span></p>
          </div>
        </label>
        <input id="u601_input" type="radio" value="101" name="dwellWay" />
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u602" class="ax_default radio_button">
        <label for="u602_input" style="position: absolute; left: 0px;">
          <div id="u602_text" class="text ">
            <p><span>家庭居住</span></p>
          </div>
        </label>
        <input id="u602_input" type="radio" value="102" name="dwellWay"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u603" class="ax_default radio_button">
        <label for="u603_input" style="position: absolute; left: 0px;">
          <div id="u603_text" class="text ">
            <p><span>合伙居住</span></p>
          </div>
        </label>
        <input id="u603_input" type="radio" value="103" name="dwellWay"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u604" class="ax_default radio_button">
        <label for="u604_input" style="position: absolute; left: 0px;">
          <div id="u604_text" class="text ">
            <p><span>集体居住</span></p>
          </div>
        </label>
        <input id="u604_input" type="radio" value="104" name="dwellWay"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u605" class="ax_default radio_button">
        <label for="u605_input" style="position: absolute; left: 0px;">
          <div id="u605_text" class="text ">
            <p><span>其他</span></p>
          </div>
        </label>
        <input id="u605_input" type="radio" value="105" name="dwellWay"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u606" class="ax_default radio_button">
        <label for="u606_input" style="position: absolute; left: 0px;">
          <div id="u606_text" class="text ">
            <p><span>上学</span></p>
          </div>
        </label>
        <input id="u606_input" type="radio" value="111" name="dwellCause" />
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u607" class="ax_default radio_button">
        <label for="u607_input" style="position: absolute; left: 0px;">
          <div id="u607_text" class="text ">
            <p><span>培训</span></p>
          </div>
        </label>
        <input id="u607_input" type="radio" value="112" name="dwellCause"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u608" class="ax_default radio_button">
        <label for="u608_input" style="position: absolute; left: 0px;">
          <div id="u608_text" class="text ">
            <p><span>因公出差</span></p>
          </div>
        </label>
        <input id="u608_input" type="radio" value="113" name="dwellCause" />
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u609" class="ax_default radio_button">
        <label for="u609_input" style="position: absolute; left: 0px;">
          <div id="u609_text" class="text ">
            <p><span>治病疗养</span></p>
          </div>
        </label>
        <input id="u609_input" type="radio" value="114" name="dwellCause"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u610" class="ax_default radio_button">
        <label for="u610_input" style="position: absolute; left: 0px;">
          <div id="u610_text" class="text ">
            <p><span>投靠亲友</span></p>
          </div>
        </label>
        <input id="u610_input" type="radio" value="115" name="dwellCause"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u611" class="ax_default radio_button">
        <label for="u611_input" style="position: absolute; left: 0px;">
          <div id="u611_text" class="text ">
            <p><span>探亲访友</span></p>
          </div>
        </label>
        <input id="u611_input" type="radio" value="116" name="dwellCause"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u612" class="ax_default radio_button">
        <label for="u612_input" style="position: absolute; left: 0px;">
          <div id="u612_text" class="text ">
            <p><span>旅游观光</span></p>
          </div>
        </label>
        <input id="u612_input" type="radio" value="117" name="dwellCause"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u613" class="ax_default radio_button">
        <label for="u613_input" style="position: absolute; left: 0px;">
          <div id="u613_text" class="text ">
            <p><span>其他</span></p>
          </div>
        </label>
        <input id="u613_input" type="radio" value="118" name="dwellCause"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u614" class="ax_default radio_button">
        <label for="u614_input" style="position: absolute; left: 0px;">
          <div id="u614_text" class="text ">
            <p><span>自建房屋</span></p>
          </div>
        </label>
        <input id="u614_input" type="radio" value="119" name="houseSort" />
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u615" class="ax_default radio_button">
        <label for="u615_input" style="position: absolute; left: 0px;">
          <div id="u615_text" class="text ">
            <p><span>自购房屋</span></p>
          </div>
        </label>
        <input id="u615_input" type="radio" value="120" name="houseSort" />
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u616" class="ax_default radio_button">
        <label for="u616_input" style="position: absolute; left: 0px;">
          <div id="u616_text" class="text ">
            <p><span>单位房屋</span></p>
          </div>
        </label>
        <input id="u616_input" type="radio" value="121" name="houseSort"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u617" class="ax_default radio_button">
        <label for="u617_input" style="position: absolute; left: 0px;">
          <div id="u617_text" class="text ">
            <p><span>集中公寓</span></p>
          </div>
        </label>
        <input id="u617_input" type="radio" value="122" name="houseSort"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u618" class="ax_default radio_button">
        <label for="u618_input" style="position: absolute; left: 0px;">
          <div id="u618_text" class="text ">
            <p><span>租赁房屋</span></p>
          </div>
        </label>
        <input id="u618_input" type="radio" value="123" name="houseSort"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u619" class="ax_default radio_button">
        <label for="u619_input" style="position: absolute; left: 0px;">
          <div id="u619_text" class="text ">
            <p><span>其他</span></p>
          </div>
        </label>
        <input id="u619_input" type="radio" value="127" name="houseSort"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u620" class="ax_default radio_button">
        <label for="u620_input" style="position: absolute; left: 0px;">
          <div id="u620_text" class="text ">
            <p><span>居民家中</span></p>
          </div>
        </label>
        <input id="u620_input" type="radio" value="126" name="houseSort" />
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u621" class="ax_default radio_button">
        <label for="u621_input" style="position: absolute; left: 0px;">
          <div id="u621_text" class="text ">
            <p><span>临建房屋</span></p>
          </div>
        </label>
        <input id="u621_input" type="radio" value="125" name="houseSort"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u622" class="ax_default radio_button">
        <label for="u622_input" style="position: absolute; left: 0px;">
          <div id="u622_text" class="text ">
            <p><span>工地现场</span></p>
          </div>
        </label>
        <input id="u622_input" type="radio" value="124" name="houseSort"/>
      </div>

      <!-- Unnamed (文本框) -->
      <div id="u623" class="ax_default text_field">
       <!-- <input id="u623_input" type="text" value=""name=""/>-->
        <select id="u623_input" onclick="selectCounty()"/>

        </select>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u624" class="ax_default box_1">
        <div id="u624_div" class=""></div>
        <div id="u624_text" class="text ">
          <p><span>（市）</span></p>
        </div>
      </div>

      <!-- Unnamed (文本框) -->
      <div id="u625" class="ax_default text_field">
        <select id="u625_input" name="" class="town"/>

        </select>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u626" class="ax_default box_1">
        <div id="u626_div" class=""></div>
        <div id="u626_text" class="text ">
          <p><span>（县）</span></p>
        </div>
      </div>

      <!-- Unnamed (文本框) -->
      <div id="u627" class="ax_default text_field">
       <!-- <input id="u627_input" type="text" value=""/>-->
        <select id="u627_input" onclick="selectTownship()" name="" class="county"/>

        </select>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u628" class="ax_default box_1">
        <div id="u628_div" class=""></div>
        <div id="u628_text" class="text ">
          <p><span>（镇）</span></p>
        </div>
      </div>

      <!-- Unnamed (文本框) -->
      <div id="u629" class="ax_default text_field">
        <input id="u629_input" type="text" value="" name=""/>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u630" class="ax_default box_1">
        <div id="u630_div" class=""></div>
        <div id="u630_text" class="text ">
          <p><span>（街路巷）</span></p>
        </div>
      </div>

      <!-- Unnamed (文本框) -->
      <div id="u631" class="ax_default text_field">
        <input id="u631_input" type="text" value="" name=""/>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u632" class="ax_default box_1">
        <div id="u632_div" class=""></div>
        <div id="u632_text" class="text ">
          <p><span>门楼牌号</span></p>
        </div>
      </div>

      <!-- Unnamed (文本框) -->
      <div id="u633" class="ax_default text_field">
        <input id="u633_input" type="text"name=""/>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u634" class="ax_default box_1">
        <div id="u634_div" class=""></div>
        <div id="u634_text" class="text ">
          <p><span>门楼详址</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u635" class="ax_default box_1">
        <div id="u635_div" class=""></div>
        <div id="u635_text" class="text ">
          <p><span>房间号</span></p>
        </div>
      </div>

      <!-- Unnamed (文本框) -->
      <div id="u636" class="ax_default text_field">
        <input id="u636_input" type="text"/>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u637" class="ax_default box_1">
        <div id="u637_div" class=""></div>
        <div id="u637_text" class="text ">
          <p><span>出租人情况</span></p>
        </div>
      </div>

      <!-- Unnamed (表格) -->
      <div id="u638" class="ax_default">

        <!-- Unnamed (单元格) -->
        <div id="u639" class="ax_default table_cell">
<!--          <img id="u639_img" class="img " src="images/居住信息/u639.png"/>-->
          <div id="u639_text" class="text ">
            <p><span>房东姓名</span></p>
          </div>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u640" class="ax_default table_cell">
          <input id="u640_img" type="text" name="landlordName"/>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u641" class="ax_default table_cell">
          <!--<img id="u641_img" class="img " src="images/居住信息/u639.png"/>-->
          <div id="u641_text" class="text ">
            <p><span>联系电话</span></p>
          </div>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u642" class="ax_default table_cell">
          <input id="u642_img" type="text" name="landlordPhone"/>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u643" class="ax_default table_cell">
         <!-- <img id="u643_img" class="img " src="images/居住信息/u643.png"/>-->
          <div id="u643_text" class="text ">
            <p><span>是否签订治安责任书</span></p>
          </div>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u644" class="ax_default table_cell">
          <select id="u644_img" name="landlordDutyBook">
            <option value="">请选择</option>
            <option value="0" selected>是</option>
            <option value="1">否</option>
          </select>
        </div>
        <br/>
        <!-- Unnamed (单元格) -->
        <div id="u645" class="ax_default table_cell">
          <!--<img id="u645_img" class="img " src="images/审核中/u181.png"/>-->
          <div id="u645_text" class="text ">
            <p><span>房东身份号码</span></p>
          </div>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u646" class="ax_default table_cell">
          <!--<img id="u646_img" class="img " src="images/审核中/u181.png"/>-->
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u647" class="ax_default table_cell">
          <!--<img id="u647_img" class="img " src="images/审核中/u181.png"/>-->
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u648" class="ax_default table_cell">
         <!-- <img id="u648_img" class="img " src="images/审核中/u181.png"/>-->
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u649" class="ax_default table_cell">
          <!--<img id="u649_img" class="img " src="images/居住信息/u649.png"/>-->
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u650" class="ax_default table_cell">
          <!--<img id="u650_img" class="img " src="images/居住信息/u650.png"/>-->
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u651" class="ax_default table_cell">
         <!-- <img id="u651_img" class="img " src="images/审核中/u181.png"/>-->
          <div id="u651_text" class="text ">
            <p><span>代理人姓名</span></p>
          </div>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u652" class="ax_default table_cell">
          <input id="u652_img" type="text" name="agentName">
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u653" class="ax_default table_cell">
          <!--<img id="u653_img" class="img " src="images/审核中/u181.png"/>-->
          <div id="u653_text" class="text ">
            <p><span>联系电话</span></p>
          </div>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u654" class="ax_default table_cell">
          <input id="u654_img" type="text" name="agentPhone">
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u655" class="ax_default table_cell">
          <!--<img id="u655_img" class="img " src="images/居住信息/u649.png"/>-->
          <div id="u655_text" class="text ">
            <p><span>是否签订治安责任书</span></p>
          </div>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u656" class="ax_default table_cell">
          <select id="u656_img" name="agentDutyBook">
            <option value="">请选择</option>
            <option value="0" selected>是</option>
            <option value="1">否</option>
          </select>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u657" class="ax_default table_cell">
          <!--<img id="u657_img" class="img " src="images/审核中/u201.png"/>-->
          <div id="u657_text" class="text ">
            <p><span>代理人身份号码</span></p>
          </div>
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u658" class="ax_default table_cell">
          <!--<img id="u658_img" class="img " src="images/审核中/u201.png"/>-->
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u659" class="ax_default table_cell">
          <!--<img id="u659_img" class="img " src="images/审核中/u201.png"/>-->
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u660" class="ax_default table_cell">
          <!--<img id="u660_img" class="img " src="images/审核中/u201.png"/>-->
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u661" class="ax_default table_cell">
          <!--<img id="u661_img" class="img " src="images/居住信息/u661.png"/>-->
        </div>

        <!-- Unnamed (单元格) -->
        <div id="u662" class="ax_default table_cell">
          <!--<img id="u662_img" class="img " src="images/居住信息/u662.png"/>-->
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u663" class="ax_default box_1">
        <input type="text"id="u663_div" name="landlordIdentity">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u664" class="ax_default box_1">
        <input id="u664_div" type="text" name="agent_identity">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u665" class="ax_default box_1">
        <div id="u665_div" class=""></div>
        <div id="u665_text" class="text ">
          <p><span>房屋类型</span></p>
        </div>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u666" class="ax_default radio_button">
        <label for="u666_input" style="position: absolute; left: 0px;">
          <div id="u666_text" class="text ">
            <p><span>平房</span></p>
          </div>
        </label>
        <input id="u666_input" type="radio" value="128" name="houseType"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u667" class="ax_default radio_button">
        <label for="u667_input" style="position: absolute; left: 0px;">
          <div id="u667_text" class="text ">
            <p><span>楼房</span></p>
          </div>
        </label>
        <input id="u667_input" type="radio" value="129" name="houseType"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u668" class="ax_default radio_button">
        <label for="u668_input" style="position: absolute; left: 0px;">
          <div id="u668_text" class="text ">
            <p><span>临时建筑</span></p>
          </div>
        </label>
        <input id="u668_input" type="radio" value="130" name="houseType"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u669" class="ax_default radio_button">
        <label for="u669_input" style="position: absolute; left: 0px;">
          <div id="u669_text" class="text ">
            <p><span>地下建筑</span></p>
          </div>
        </label>
        <input id="u669_input" type="radio" value="131" name="houseType"/>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u670" class="ax_default box_1">
        <div id="u670_div" class=""></div>
        <div id="u670_text" class="text ">
          <p><span>信息采集员</span></p>
        </div>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u671" class="ax_default radio_button">
        <label for="u671_input" style="position: absolute; left: 0px;">
          <div id="u671_text" class="text ">
            <p><span>办公</span></p>
          </div>
        </label>
        <input id="u671_input" type="radio" value="132" name="houseUse"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u672" class="ax_default radio_button">
        <label for="u672_input" style="position: absolute; left: 0px;">
          <div id="u672_text" class="text ">
            <p><span>经营</span></p>
          </div>
        </label>
        <input id="u672_input" type="radio" value="133" name="houseUse"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u673" class="ax_default radio_button">
        <label for="u673_input" style="position: absolute; left: 0px;">
          <div id="u673_text" class="text ">
            <p><span>生产</span></p>
          </div>
        </label>
        <input id="u673_input" type="radio" value="134" name="houseUse"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u674" class="ax_default radio_button">
        <label for="u674_input" style="position: absolute; left: 0px;">
          <div id="u674_text" class="text ">
            <p><span>仓储</span></p>
          </div>
        </label>
        <input id="u674_input" type="radio" value="135" name="houseUse"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u675" class="ax_default radio_button">
        <label for="u675_input" style="position: absolute; left: 0px;">
          <div id="u675_text" class="text ">
            <p><span>居住</span></p>
          </div>
        </label>
        <input id="u675_input" type="radio" value="136" name="houseUse"/>
      </div>

      <!-- Unnamed (单选按钮) -->
      <div id="u676" class="ax_default radio_button">
        <label for="u676_input" style="position: absolute; left: 0px;">
          <div id="u676_text" class="text ">
            <p><span>其他</span></p>
          </div>
        </label>
        <input id="u676_input" type="radio" value="137" name="houseUse"/>
      </div>

      <!-- Unnamed (提交按钮) -->
      <div id="u677" class="ax_default html_button">
        <button id="u677_input" type="button"  onclick="insertDwellMessage()">提交</button>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u678" class="ax_default box_3">
        <div id="u678_div" class=""></div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u679" class="ax_default box_1">
        <div id="u679_div" class=""></div>
        <div id="u679_text" class="text ">
          <p><span>版权所有：公安局</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u687" class="ax_default box_1">
        <div id="u687_div" class=""></div>
        <div id="u687_text" class="text ">
          <p><span>房屋用途</span></p>
        </div>
      </div>

      <!-- Unnamed (文本框) -->
      <div id="u688" class="ax_default text_field">
        <input id="u688_input" type="text" name="messageGather"/>
      </div>

    </div>
    </div>
  </form>
  </body>
<script>
    var id = "";
    var employmentMessageId = "";
    var dwellMessageId = "";
    var planingId = "";
    var spouse = "";
    var provinceCode = "";
    $(function() {
        id = location.href.split("personalId=")[1];
        if(id.includes("&")){
            id = id.split("&")[0];
        }
        $.ajax({
          url:"/findPersonalMessageById",
          data:{id:id},
          dataType:"json",
          type:"post",
          async:false,
          success:function(data) {
            employmentMessageId = data.employmentMessage
            dwellMessageId = data.dwellMessageId;
            planingId = data.familyPlanningId;
            spouse = data.spouse;
            provinceCode = data.nowInProvince;
          }
        })
        $.ajaxSettings.async = false;
        $.getJSON("/selectCity",{"code":provinceCode},function (data) {
            $("#u623_input").empty();
            var city='<option value="">请选择</option>';
            for(var i=0;i<data.length;i++){
                var c=data[i];
                city+='<option value="'+c.code+'">'+c.name+'</option>';
            }
            $("#u623_input").append(city);
        })
        if(dwellMessageId!=undefined&&dwellMessageId!=""&&dwellMessageId!=null){
            findDwellMessageById(dwellMessageId);
        }
    })
    //根据市编号查县
    function selectCounty() {
        var code = $("#u623_input").val();
        $.ajaxSettings.async = false;
        $.getJSON("/selectCounty",{"code":code},function (data) {
            $("#u627_input").empty();
            var county='<option value="">请选择</option>';
            for(var i=0;i<data.length;i++){
                var c = data[i];
                county += '<option value="'+c.code+'">'+c.name+'</option>';
            }
            $("#u627_input").append(county);
        })
    }
    /**
     * 不为空
     */
    function checkText(dom,reg,tip,tip2) {
        if(dom.val()==""||dom.val()==null){
            alert(tip)
            return false;
        }else if(!reg.test(dom.val())){
            alert(tip2)
            return false;
        }
        return true;
    }
    function findDwellMessageById(id) {
        $.ajax({
            url:"/findDwellMessageById",
            data:{id:id},
            dataType:"json",
            type:"post",
            async:false,
            success:function(data) {
                $("#id").val(id);
                $.each($("input[name='dwellWay']"),function(index,item) {//遍历单选框
                    if($(item).val()==data.dwellWay){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                var place = data.dwellCounty.split("-");
                var url = location.href; //获取url中"?"符后的字串
                var provinceCode = url.split("=")[2];
                if(provinceCode.includes("&")){
                    provinceCode = provinceCode.split("&")[0];
                }
                var city = findCityByName(place[0],provinceCode)
                $("#u623_input").val(city);
                selectCounty();
                var countyCode = findCountyByName(place[1],city);
                $("#u627_input").val(countyCode);
                selectTownship();
                var town = findTownByName(place[2],countyCode);
                $("#u625_input").val(town);
                $("#u629_input").val(place[3]);
                $("#u631_input").val(place[4]);
                $("#u633_input").val(place[5]);
                $("#u636_input").val(place[6]);
                $("#u640_img").val(data.landlordName);
                $("#u642_img").val(data.landlordPhone);
                $("#u663_div").val(data.landlordIdentity);
                $("#u644_img").val(data.landlordDutyBook);
                $("#u652_img").val(data.agentName);
                $("#u654_img").val(data.agentName);
                $("#u688_input").val(data.agentName);
                $("#u664_div").val(data.agent_identity);
                $.each($("input[name='dwellCause']"),function(index,item) {
                    if($(item).val()==data.dwellCause){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                $.each($("input[name='houseType']"),function(index,item) {
                    if($(item).val()==data.houseType){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                $.each($("input[name='houseUse']"),function(index,item) {
                    if($(item).val()==data.houseUse){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })

            }
        })
    }
    //根据县编号查镇
    function selectTownship() {
        var code=$("#u627_input").val();
        $.ajaxSettings.async = false;
        $.getJSON("/selectTownship",{"code":code},function (data) {
            $("#u625_input").empty();
            var zhen='<option value="">请选择</option>';
            for(var i=0;i<data.length;i++){
                var c=data[i];
                zhen += '<option value="'+c.code+'">'+c.name+'</option>';
            }
            $("#u625_input").append(zhen);
        })
    }
    /**
     * 跳转到个人信息，传个人信息id
     */
    function toPersonalMessage() {
        var url = location.href; //获取url中"?"符后的字串
        var personalId = url.split("=")[1].split("&")[0];
        if($("#id").val()!=null && $("#id").val()!=""){
            window.location = "/toPersonalInformation?id="+personalId+"&dwellMessageId="+$("#id").val();
        }else {
            window.location = "/toPersonalInformation?id="+personalId;
        }
    }
    /**
     * 跳转到配偶信息，传递省码
     */
    function toSpouse() {
        if(spouse!=''&&spouse!=null){
            window.location = "/toSpouse?personalId="+id+"&spouse="+spouse;
            return;
        }
        window.location = "/toSpouse?personalId="+id;
    }
    /**
     * 跳转到计生信息，传递省码
     */
    function toFamilyPlanning() {
        if(planingId!=''&&planingId!=null){
            window.location = "/toFamilyPlanning?personalId="+id+"&provinceCode="+provinceCode+"&planingId="+planingId;
            return;
        }
        window.location = "/toFamilyPlanning?personalId="+id+"&provinceCode="+provinceCode;
    }
    /**
     * 跳转到成员信息，传递省码 TODO
     */
    function toFamilyMember() {
       window.location = "/toFamilyMember?personalId="+id;
    }
    /**
     * 跳转到就业信息，传递省码
     */
    function toEmploymentInformation() {
            if(employmentMessageId!=''&&employmentMessageId!=null){
                window.location = "/toEmploymentInformation?personalId="+id+"&provinceCode="+provinceCode+"&employmentMessageId="+employmentMessageId;
                return;
            }
            window.location = "/toEmploymentInformation?personalId="+id+"&provinceCode="+provinceCode;
    }
    function insertDwellMessage() {
         var city = $("#u623_input option:selected").text();
         var city1 = $("#u627_input option:selected").text();
         var city2 = $("#u625_input option:selected").text();
         var city3 = $("#u629_input").val();
         var city4 = $("#u631_input").val();
         var city5 = $("#u633_input").val();
         var city6 = $("#u636_input").val();
         var x = city+"-"+city1+"-"+city2+"-"+city3+"-"+city4+"-"+city5+"-"+city6;
        if(city == null || city == "请选择"){
            alert("请选择市");
            return;
        }
        if(city1 == null || city1 == "请选择"){
            alert("请选择县");
            return;
        }
        if(city2 == null || city2 == "请选择"){
            alert("请选择镇");
            return;
        }
        if(city3== null || city3 == ""){
            alert("请输入街路巷");
            return;
        }
        if(city4 == null || city4 == ""){
            alert("请输入门楼牌号");
            return;
        }
        if(city5 == null || city5 == ""){
            alert("请输入门楼详址");
            return;
        }
        if(city6 == null || city6 == ""){
            alert("请输入房间号");
            return;
        }
        if(!checkText($("input[id='u640_img']"),/^[\u4E00-\u9FA5\uf900-\ufa2d·\s]{2,20}$/,"姓名不能为空","姓名格式错误")){
            return;
        }
        if(!checkText($("input[id='u642_img']"),/^1[3456789]\d{9}$/,"手机不能为空","手机格式错误")){
            return;
        }
        if(!checkText($("input[id='u652_img']"),/^[\u4E00-\u9FA5\uf900-\ufa2d·\s]{2,20}$/,"姓名不能为空","姓名格式错误")){
            return;
        }
        if(!checkText($("input[id='u654_img']"),/^1[3456789]\d{9}$/,"手机不能为空","手机格式错误")){
            return;
        }
        if(!checkText($("input[id='u663_div']"),/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,"身份证不能为空","身份证格式错误")){
            return;
        }
        if(!checkText($("input[id='u664_div']"),/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,"身份证不能为空","身份证格式错误")){
            return;
        }
        if(!checkText($("input[id='u688_input']"),/^[\u4E00-\u9FA5\uf900-\ufa2d·\s]{2,20}$/,"姓名不能为空","姓名格式错误")){
            return;
        }
        var fromdata = new FormData($("#form2")[0])
        fromdata.append("dwellCounty",x);
        fromdata.append("id",$("#id").val());
        var personalId = location.href.split("personalId=")[1];
        if(personalId.indexOf("&")!=-1){
            personalId = personalId.split("&")[0];
        }
        fromdata.append("personalId",personalId);
        $.ajax({
            url:"/insertDwellMessage",
            data:fromdata,
            type:"post",
            async:false,
            dataType:"json",
            processData:false,
            contentType:false,
            success:function (data) {
                $("#id").val(data);
                $.ajax({
                  url:"/updatePersonalInformation",
                  data:{id:personalId,dwellMessageId:data},
                  dataType:"json",
                  type:"post"
                })
                alert("添加成功");
            }
        })
    }
    function findTownByName(name,countyCode) {
        var code = "";
        $.ajax({
            url:"/findTownByName",
            data:{name:name,countyCode:countyCode},
            async:false,
            type:"post",
            dataType:"json",
            success:function(data) {
                code = data;
            }
        })
        return code;
    }
    /**
     * 通过姓名查区code
     */
    function findCountyByName(name,cityName) {
        var code = "";
        $.ajax({
            url:"/findCountyByName",
            data:{name:name,cityName:cityName},
            async:false,
            type:"post",
            dataType:"json",
            success:function(data) {
                code = data;
            }
        })
        return code;
    }
    /**
     *  通过姓名查市code
     */
    function findCityByName(name,provinceCode) {
        var code = "";
        $.ajax({
            url:"/findCityByName",
            data:{name:name,provinceCode:provinceCode},
            async:false,
            type:"post",
            dataType:"json",
            success:function(data) {
                code = data;
            }
        })
        return code;
    }
  </script>
</html>
